import plotly.offline as pyo
from plotly.graph_objs import *
import chart_studio.plotly as py
import pandas as pd
from pandas import DataFrame
pyo.offline.init_notebook_mode()
gapMinder = py.get_figure("rmuir", 225)
lifeExp = py.get_figure("rmuir", 223)
gapMinder['layout'].update({'annotations' : [{'text' : "<i>Source: https://www.gapminder.org/data/</i>",
'xref' : 'paper',
'yref' : 'paper',
'x' : 0,
'y' : -0.4,
'font' : {'size' : 12,
'color' : 'grey'},
'xanchor' : 'left',
'showarrow' : False}]})
pyo.iplot(gapMinder)
lifeExp['layout'].update({'annotations' : [{'text' : "<i>Source: The World Health Organisation (WHO)</i>",
'xref' : 'paper',
'yref' : 'paper',
'x' : 0,
'y' : -0.4,
'font' : {'size' : 12,
'color' : 'grey'},
'xanchor' : 'left',
'showarrow' : False}]})
pyo.iplot(lifeExp)
lifeExp['layout'].update({'height' : 500, 'margin' : {'b' : 130}})
pyo.iplot(lifeExp)